home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 25 / CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso / CUCD / Programming / ixemul / sdk / man / cat2 / msgget.0 < prev    next >
Encoding:
Text File  |  1998-06-15  |  2.9 KB  |  67 lines

  1.  
  2. MSGGET(2)                  UNIX Programmer's Manual                  MSGGET(2)
  3.  
  4. NNAAMMEE
  5.      mmssggggeett - get message queue
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
  9.      ##iinncclluuddee <<ssyyss//iippcc..hh>>
  10.      ##iinncclluuddee <<ssyyss//mmssgg..hh>>
  11.  
  12.      _i_n_t
  13.      mmssggggeett(_k_e_y___t _k_e_y, _i_n_t _m_s_g_f_l_g)
  14.  
  15. DDEESSCCRRIIPPTTIIOONN
  16.      mmssggggeett() returns the message queue identifier associated with _k_e_y. A mes-
  17.      sage queue identifier is a unique integer greater than zero.
  18.  
  19.      A message queue is created if either _k_e_y is equal to IPC_PRIVATE, or _k_e_y
  20.      does not have a message queue identifier associated with it, and the
  21.      IPC_CREAT bit is set in _m_s_g_f_l_g_.
  22.  
  23.      If a new message queue is created, the data structure associated with it
  24.      (the _m_s_q_i_d___d_s structure, see msgctl(2))  is initialized as follows:
  25.  
  26.      ++oo   _m_s_g___p_e_r_m_._c_u_i_d and _m_s_g___p_e_r_m_._u_i_d are set to the effective uid of the
  27.          calling process.
  28.  
  29.      ++oo   _m_s_g___p_e_r_m_._g_i_d and _m_s_g___p_e_r_m_._c_g_i_d are set to the effective gid of the
  30.          calling process.
  31.  
  32.      ++oo   _m_s_g___p_e_r_m_._m_o_d_e is set to the lower 9 bits of _m_s_g_f_l_g.
  33.  
  34.      ++oo   _m_s_g___c_b_y_t_e_s, _m_s_g___q_n_u_m, _m_s_g___l_s_p_i_d, _m_s_g___l_r_p_i_d, _m_s_g___r_t_i_m_e, and _m_s_g___s_t_i_m_e
  35.          are set to 0
  36.  
  37.      ++oo   _m_s_g___q_b_y_t_e_s is set to the system wide maximum value for the number of
  38.          bytes in a queue (MSGMNB).
  39.  
  40.      ++oo   _m_s_g___c_t_i_m_e is set to the current time.
  41.  
  42. RREETTUURRNN VVAALLUUEESS
  43.      Upon successful completion a positive message queue identifier is re-
  44.      turned.  Otherwise, -1 is returned and the global variable _e_r_r_n_o is set
  45.      to indicate the error.
  46.  
  47. EERRRROORRSS
  48.      [EACESS]      A message queue is already associated with _k_e_y and the
  49.                    caller has no permission to access it.
  50.  
  51.      [EEXIST]      Both IPC_CREAT and IPC_EXCL are set in _m_s_g_f_l_g, and a mes-
  52.                    sage queue is already associated with _k_e_y.
  53.  
  54.      [ENOSPC]      A new message queue could not be created because the system
  55.                    limit for the number of message queues has been reached.
  56.  
  57.      [ENOENT]      IPC_CREAT was not set in _m_s_g_f_l_g and no message queue asso-
  58.                    ciated with _k_e_y was found.
  59.  
  60. SSEEEE AALLSSOO
  61.      msgctl(2),  msgrcv(2),  msgsnd(2)
  62.  
  63. HHIISSTTOORRYY
  64.      Message queues appeared in the first release of AT&T Unix System V.
  65.  
  66.  NetBSD                         August 17, 1995                              1
  67.